package com.oitsm.commons.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
/**
 * Action����
 * @author Arab Runner
 * Jun 18, 2011 3:05:17 PM
 */
@SuppressWarnings("serial")
public class BaseAction extends ActionSupport{
    HttpServletRequest request = ServletActionContext.getRequest();
    HttpServletResponse response = ServletActionContext.getResponse();
    
    
    protected HttpServletRequest getRequest(){
        return  ServletActionContext.getRequest();
    }
    protected HttpServletResponse getResponse(){
        return ServletActionContext.getResponse();
    }
    protected HttpSession getSession(){
        return ServletActionContext.getRequest().getSession();
    }
    
    protected String getContextPath(){
    	return this.getSession().getServletContext().getContextPath();
    }
}
